<template>
  <h1 v-text="msg"></h1>
  <h1 v-text="person.realName"></h1>
  <h1 v-text="person.slogan"></h1>
  <button type="button" @click="updateName">点我试试</button>
</template>
<script setup>
import {ref} from 'vue';

defineProps(['msg', 'person']);
const emit = defineEmits(['update']);
const myName = ref('李胜龙');
const updateName = function () {
  emit('update', myName);
}
</script>
<script>
export default {
  name: "LhzI",
}
</script>

<style scoped>

</style>